package com.atguigu.java.ai.langchain4j.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

/**
 * @Author: zhang
 * @Date: 2025/9/2 19:07
 * @Description:
 **/
@AiService(wiringMode = AiServiceWiringMode.EXPLICIT
            ,streamingChatModel = "qwenStreamingChatModel"
            ,chatMemoryProvider = "chatMemoryProvider"
            ,tools = "myTools")
public interface XiaozhiAgent {
    @SystemMessage(fromResource = "zhaozhi-prompt-template.txt")
    Flux<String> chat (@MemoryId Long memoryId , @UserMessage String userMessage);
}
